﻿<local:BaseWindow
    x:Class="LenovoLegionToolkit.WPF.Windows.Settings.PowerPlansWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:LenovoLegionToolkit.WPF.Controls"
    xmlns:local="clr-namespace:LenovoLegionToolkit.WPF.Windows"
    xmlns:resources="clr-namespace:LenovoLegionToolkit.WPF.Resources"
    xmlns:utils="clr-namespace:LenovoLegionToolkit.WPF.Utils"
    xmlns:wpfui="http://schemas.lepo.co/wpfui/2022/xaml"
    Title="{x:Static resources:Resource.PowerPlansWindow_Title}"
    Width="600"
    MinWidth="500"
    MaxWidth="800"
    FlowDirection="{x:Static utils:LocalizationHelper.Direction}"
    ResizeMode="CanMinimize"
    ShowInTaskbar="False"
    SizeToContent="Height"
    WindowStartupLocation="CenterOwner">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <wpfui:TitleBar
            Grid.Row="0"
            CanMaximize="false"
            ShowMaximize="false"
            ShowMinimize="false"
            UseSnapLayout="false" />

        <Grid
            Grid.Row="0"
            Height="24"
            Margin="12,8,12,8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBlock
                Grid.Column="0"
                VerticalAlignment="Center"
                FontSize="12"
                IsHitTestVisible="False"
                Text="{x:Static resources:Resource.PowerPlansWindow_Title}" />

        </Grid>

        <controls:LoadableControl
            x:Name="_loader"
            Grid.Row="1"
            Margin="12,0,0,0"
            IndicatorVerticalAlignment="Center">

            <wpfui:DynamicScrollViewer>
                <StackPanel Margin="0,0,16,0">

                    <wpfui:CardControl
                        x:Name="_aoAcWarningCard"
                        Margin="0,0,0,24"
                        Icon="Warning24"
                        Visibility="Collapsed">
                        <wpfui:CardControl.Header>
                            <controls:CardHeaderControl Title="{x:Static resources:Resource.PowerPlansWindow_AoAcWarning_Title}" Subtitle="{x:Static resources:Resource.PowerPlansWindow_AoAcWarning_Message}" />
                        </wpfui:CardControl.Header>
                    </wpfui:CardControl>

                    <wpfui:CardControl Margin="0,0,0,8">
                        <wpfui:CardControl.Header>
                            <controls:CardHeaderControl Title="{x:Static resources:Resource.PowerPlansWindow_QuietMode}" />
                        </wpfui:CardControl.Header>
                        <ComboBox
                            x:Name="_quietModeComboBox"
                            MinWidth="200"
                            Margin="0,0,0,8"
                            MaxDropDownHeight="Auto"
                            SelectionChanged="QuietModeComboBox_SelectionChanged" />
                    </wpfui:CardControl>

                    <wpfui:CardControl Margin="0,0,0,8">
                        <wpfui:CardControl.Header>
                            <controls:CardHeaderControl Title="{x:Static resources:Resource.PowerPlansWindow_BalanceMode}" />
                        </wpfui:CardControl.Header>
                        <ComboBox
                            x:Name="_balanceModeComboBox"
                            MinWidth="200"
                            Margin="0,0,0,8"
                            MaxDropDownHeight="Auto"
                            SelectionChanged="BalanceModeComboBox_SelectionChanged" />
                    </wpfui:CardControl>

                    <wpfui:CardControl Margin="0,0,0,8">
                        <wpfui:CardControl.Header>
                            <controls:CardHeaderControl Title="{x:Static resources:Resource.PowerPlansWindow_PerformanceMode}" />
                        </wpfui:CardControl.Header>
                        <ComboBox
                            x:Name="_performanceModeComboBox"
                            MinWidth="200"
                            Margin="0,0,0,8"
                            MaxDropDownHeight="Auto"
                            SelectionChanged="PerformanceModeComboBox_SelectionChanged" />
                    </wpfui:CardControl>

                    <wpfui:CardControl x:Name="_godModeCardControl" Margin="0,0,0,8">
                        <wpfui:CardControl.Header>
                            <controls:CardHeaderControl Title="{x:Static resources:Resource.PowerPlansWindow_CustomMode}" />
                        </wpfui:CardControl.Header>
                        <ComboBox
                            x:Name="_godModeComboBox"
                            MinWidth="200"
                            Margin="0,0,0,8"
                            MaxDropDownHeight="Auto"
                            SelectionChanged="GodModeComboBox_SelectionChanged" />
                    </wpfui:CardControl>

                    <wpfui:CardControl Margin="0,16,0,16">
                        <wpfui:CardControl.Header>
                            <controls:CardHeaderControl Title="{x:Static resources:Resource.AlwaysActivatePowerPlans_Title}" Subtitle="{x:Static resources:Resource.AlwaysActivatePowerPlans_Message}" />
                        </wpfui:CardControl.Header>
                        <wpfui:ToggleSwitch
                            x:Name="_activatePowerProfilesWithVantageEnabledToggle"
                            Margin="0,0,0,8"
                            Click="ActivatePowerProfilesWithVantageEnabled_Click" />
                    </wpfui:CardControl>

                </StackPanel>
            </wpfui:DynamicScrollViewer>

        </controls:LoadableControl>

    </Grid>
</local:BaseWindow>
